<?php
class Zendhlt_View_Helper_CmsBlockTabs extends Zend_View_Helper_Abstract{
	
	public function cmsBlockTabs($title, $html = null, $info = null, $idTab, $changeURL = '') {
		
		$xhtml = '<div class="block">';
		$xhtml .= '<div class="title">';
		$xhtml .= '<div class="icon-arrow"></div>';
		$xhtml .= '<ul class="nav nav-tabs">';
		$xhtml .= '<li class="active"><a id="' . $title[0]["id"] . '" ' . $changeURL . ' href="#' . $idTab . '_pane1" data-toggle="tab">' . $title[0]["pane1"] . '</a></li>';
		$xhtml .= '<li><a id="' . $title[1]["id"] . '" ' . $changeURL . ' href="#' . $idTab . '_pane2" data-toggle="tab">' . $title[1]["pane2"] . '</a></li>';
		$xhtml .= '</ul>';
		$xhtml .= $html;
		$xhtml .= '</div>';
		$xhtml .= '<div class="content">';
		$xhtml .= '<div class="tab-content">';
		if ($info != null) {
			// Pane 1
			$xhtml .= '<div class="tab-pane active" id="' . $idTab . '_pane1">';
			$xhtml .= $info["pane1"];
			$xhtml .= '</div>';
				
			// Pane 2
			$xhtml .= '<div class="tab-pane" id="' . $idTab . '_pane2">';
			$xhtml .= $info["pane2"];
			$xhtml .= '</div>';
		}
		$xhtml .= '</div>';
		$xhtml .= '<br class="clear" /></div>';
		$xhtml .= '<br /></div>';
		
		return $xhtml;
	}
}